package cn.ffcs.uec.staff.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import cn.ffcs.uec.common.vo.UecBdDefdoc;
import cn.ffcs.uom.common.model.DefaultDaoFactory;
import cn.ffcs.uom.common.model.UomEntity;
import lombok.Getter;
import lombok.Setter;
/**
 * 军队退役人员信息
 * @Title:
 * @Description:
 * @Copyright: FFCS（C） 2017
 * @Company: FFCS
 * @author Wang Yiren
 * @Version 0.0.1 date:2018年1月7日
 * @since JDK1.6
 */
public class UecRetried extends UomEntity implements Serializable{

	private static final long serialVersionUID = 4891206446585342631L;
	/**
	 * 军队退役人员信息标识
	 * @return
	 */
	public Long getRetriedId() {
		return super.getId();
	}
	public void setRetriedId(Long retriedId) {
		super.setId(retriedId);
	}
	/**
	 * 员工标识
	 */
	@Getter
	@Setter
	private Long staffId;
	@Getter
	@Setter
	private Long monthId; // 帐期
	@Getter
	@Setter
	private String pkPsndocSub; // 主键
	@Getter
	@Setter
	private String creator; // 创建人
	@Getter
	@Setter
	private String glbdef1; // 退役人员性质
	@Getter
	@Setter
	private String glbdef10; // 处分情况
	@Getter
	@Setter
	private String glbdef11; // 六类人员
	@Getter
	@Setter
	private String glbdef12; // 企业政策性接收时间
	@Getter
	@Setter
	private String glbdef2; // 转业前干部职级
	@Getter
	@Setter
	private String glbdef3; // 军衔文职级
	@Getter
	@Setter
	private String glbdef4; // 原单位
	@Getter
	@Setter
	private String glbdef5; // 转业前所在部队
	@Getter
	@Setter
	private String glbdef6; // 转业证编号
	@Getter
	@Setter
	private String glbdef7; // 职务名称
	@Getter
	@Setter
	private String glbdef8; // 伤残情况
	@Getter
	@Setter
	private String glbdef9; // 奖励情况
	@Getter
	@Setter
	private String lastflag; // 最近记录标志
	@Getter
	@Setter
	private String modifiedtime; // 修改时间
	@Getter
	@Setter
	private String modifier; // 修改人
	@Getter
	@Setter
	private String begindate; // 开始日期
	@Getter
	@Setter
	private String creationtime; // 创建时间
	@Getter
	@Setter
	private String pkPsndoc; // 人员基本信息
	@Getter
	@Setter
	private String ts; // 时间戳
	@Getter
	@Setter
	private Long dr; // 删除标示
	@Getter
	@Setter
	private String glbdef13; // 军转退役时间
	@Getter
	@Setter
	private String glbdef14; // 军转干部
	@Getter
	@Setter
	private String glbdef15; // 退役士兵
	@Getter
	@Setter
	private String glbdef16; // 退役兵类型
	/**
	 * 创建对象实例
	 * @return
	 */
	public static UecRetried newInstance(){
		return new UecRetried();
	}
	
	/**
	 * 退役性质--glbdef1
	 */
	public String getGlbdef1Name() {
		if(this.getGlbdef1() != null) {
			String sql = "SELECT * FROM UEC_BD_DEFDOC WHERE PK_DEFDOC = ? ";
			List<Object> params = new ArrayList<Object>();
			params.add(this.getGlbdef1());
			List<UecBdDefdoc> list =  DefaultDaoFactory.getDefaultDao().jdbcFindList(sql,
					params, UecBdDefdoc.class);
			if (list != null && list.size() > 0) {
				return list.get(0).getName();
			}
		}
		return "";
	}
	/**
	 * 退役类型--glbdef16
	 */
	public String getGlbdef16Name() {
		if(this.getGlbdef16() != null) {
			String sql = "SELECT * FROM UEC_BD_DEFDOC WHERE PK_DEFDOC = ? ";
			List<Object> params = new ArrayList<Object>();
			params.add(this.getGlbdef16());
			List<UecBdDefdoc> list =  DefaultDaoFactory.getDefaultDao().jdbcFindList(sql,
					params, UecBdDefdoc.class);
			if (list != null && list.size() > 0) {
				return list.get(0).getName();
			}
		}
		return "";
	}
	/**
	 * 原单位--glbdef4
	 */
	public String getGlbdef4Name() {
		if(this.getGlbdef4() != null) {
			String sql = "SELECT * FROM UEC_BD_DEFDOC WHERE PK_DEFDOC = ? ";
			List<Object> params = new ArrayList<Object>();
			params.add(this.getGlbdef4());
			List<UecBdDefdoc> list =  DefaultDaoFactory.getDefaultDao().jdbcFindList(sql,
					params, UecBdDefdoc.class);
			if (list != null && list.size() > 0) {
				return list.get(0).getName();
			}
		}
		return "";
	}
	/**
	 * 军衔文职级--glbdef3
	 */
	public String getGlbdef3Name() {
		if(this.getGlbdef3() != null) {
			String sql = "SELECT * FROM UEC_BD_DEFDOC WHERE PK_DEFDOC = ? ";
			List<Object> params = new ArrayList<Object>();
			params.add(this.getGlbdef3());
			List<UecBdDefdoc> list =  DefaultDaoFactory.getDefaultDao().jdbcFindList(sql,
					params, UecBdDefdoc.class);
			if (list != null && list.size() > 0) {
				return list.get(0).getName();
			}
		}
		return "";
	}
	/**
	 * 伤残情况--glbdef8
	 */
	public String getGlbdef8Name() {
		if(this.getGlbdef8() != null) {
			String sql = "SELECT * FROM UEC_BD_DEFDOC WHERE PK_DEFDOC = ? ";
			List<Object> params = new ArrayList<Object>();
			params.add(this.getGlbdef8());
			List<UecBdDefdoc> list =  DefaultDaoFactory.getDefaultDao().jdbcFindList(sql,
					params, UecBdDefdoc.class);
			if (list != null && list.size() > 0) {
				return list.get(0).getName();
			}
		}
		return "";
	}
	/**
	 * 奖励情况--glbdef9
	 */
	public String getGlbdef9Name() {
		if(this.getGlbdef9() != null) {
			String sql = "SELECT * FROM UEC_BD_DEFDOC WHERE PK_DEFDOC = ? ";
			List<Object> params = new ArrayList<Object>();
			params.add(this.getGlbdef9());
			List<UecBdDefdoc> list =  DefaultDaoFactory.getDefaultDao().jdbcFindList(sql,
					params, UecBdDefdoc.class);
			if (list != null && list.size() > 0) {
				return list.get(0).getName();
			}
		}
		return "";
	}
	/**
	 * 处分情况--glbdef10
	 */
	public String getGlbdef10Name() {
		if(this.getGlbdef10() != null) {
			String sql = "SELECT * FROM UEC_BD_DEFDOC WHERE PK_DEFDOC = ? ";
			List<Object> params = new ArrayList<Object>();
			params.add(this.getGlbdef10());
			List<UecBdDefdoc> list =  DefaultDaoFactory.getDefaultDao().jdbcFindList(sql,
					params, UecBdDefdoc.class);
			if (list != null && list.size() > 0) {
				return list.get(0).getName();
			}
		}
		return "";
	}

}
